<%-- 
    Document   : comIndex
    Created on : 2011-9-17, 12:58:13
    Author     : Frank
--%>
<%@page import="efrei.ete.util.Util"%>
<%@page import="java.util.ArrayList"%>
<%@page import="efrei.ete.bean.Floor"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Themes List</title>
        <style type="text/css">
            <!--
            .STYLE10 {	font-size: 16px;
                       color: #9900CC;
            }
            .STYLE12 {	font-size: 18px;
                       color: #9900CC;
                       font-weight: bold;
            }
            .STYLE13 {	font-size: 18px;
                       font-weight: bold;
            }
            .STYLE15 {color: #000000; font-weight: bold; font-size: 18px; }
            .STYLE16 {font-size: 18}
            .STYLE17 {font-size: 18px}
            .STYLE5 {font-size: 18px; color: #FF0000; }
            .STYLE8 {color: #000000}
            .STYLE9 {color: #000000; font-weight: bold; }
            -->
        </style>
        <script type="text/JavaScript" src="../js/jquery-1.5.1"></script>
        <script type="text/JavaScript">
            <!--
            function MM_jumpMenu(targ,selObj,restore){ //v3.0
                eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
                if (restore) selObj.selectedIndex=0;
            }
            
            function openAPost(globalId,postId){
                alert(globalId+" g/p  "+postId)
            }
            //-->
        </script>
    </head>

    <body>
        <p class="STYLE16"><img src="img/tree_root.gif" alt="Home" width="18" height="18" /> <span class="STYLE17">&gt;</span> <span class="STYLE17">Communication platform </span></p>
        <p><a href="post.jsp"><img src="img/newtopic.gif" alt="Post" name="Post" width="86" height="28" border="0" align="middle" id="Post" /></a> </p>
        <table width="877" border="5" align="center" cellpadding="0" cellspacing="0" bordercolor="#990000">
            <tr>
                <td width="650"><span class="STYLE5"> Filter ：</span>
                    <select name="menu1" size="1" onchange="MM_jumpMenu('parent',this,0)">
                        <option>All themes</option>
                        <option>Vote</option>
                        <option>Reward</option>
                    </select>
                    <select name="menu2" onchange="MM_jumpMenu('parent',this,0)">
                        <option>All the times</option>
                        <option>One day</option>
                        <option>Two days</option>
                        <option>One week</option>
                        <option>Three weeks</option>
                        <option>One month</option>
                        <option>Three months</option>
                    </select>
                    <span class="STYLE5"> Sort :</span>
                    <select name="menu3" onchange="MM_jumpMenu('parent',this,0)">
                        <option>General sort</option>
                        <option>Time sort</option>
                        <option>View / Reply</option>
                        <option>Reply</option>
                        <option>Hot</option>
                        <option>The newest</option>
                    </select>
                    <label></label>
                    <label></label>
                    <form name="form1" id="form1">
                        <div align="left"></div>
                    </form></td>
                <td width="105"><label>
                        <div align="center"><span class="STYLE12">Author</span></div>
                    </label>
                    <label></label></td>
                <td width="106"><div align="center"><strong>date</strong></div></td>
            </tr>
            <%
                ArrayList<Floor> postFloorList = Util.getPostFloorList();
                for (int i = 0; i < postFloorList.size(); i++) {
                    out.println("<tr>"
                            + "<td align=\"right\">"
                            + "<a href=\"aPost.jsp\">"
                            + "<div align=\"left\" class=\"STYLE8\">"
                            + "<div align=\"justify\">"
                            + "<strong>"
                            + postFloorList.get(i).getSubject()
                            + "</strong>"
                            + "</div>"
                            + "</div>"
                            + "</td>"
                            + "<td align=\"right\">"
                            + "<div align=\"center\">"
                            + "<strong>"
                            + "<span class=\"STYLE10\">"
                            + Util.getNameById(postFloorList.get(i).getAuthorID())
                            + "</span>"
                            + "</strong>"
                            + "</div>"
                            + "</td>"
                            + "<td align=\"right\">"
                            + "<div align=\"center\">"
                            + "<span class=\"STYLE13\">"
                            + Util.dateToString(postFloorList.get(i).getPostTime())
                            + "</span>"
                            + "</div>"
                            + "</a>"
                            + "</td>"
                            + "</tr>");
                }
            %>
        </table>
        <p align="left"></p>
    </body>
</html>